#lang racket

(define (add-to-pi n)
  (cond 
    [(zero? n) 3.14]
    [else (add1 (add-to-pi (sub1 n)))]))

; n + x = x + 1 + 1 + 1 + ......(n)
(define (add n x)
  (cond
    [(zero? n) x]
    [else (add1 (add (sub1 n) x))]))

; x * y = x + x + x + ......(y)
(define (multiply x y)
  (cond
    [(zero? y) 0]
    [(= y 1) (add x 0)]
    [else (add x (multiply x (sub1 y)))])
  )

; x^n = x * x *x......(n)
(define (exponent x n)
  (cond
    [(zero? n) 1]
    [(= n 1) (multiply x 1)]
    [else (multiply x (exponent x (sub1 n)))])
  )

; Test
(add-to-pi 5)
(add 10 5)
(multiply 5 3)
(exponent 5 4)